package com.liner.homework.first;

/**
 * Student类：name，age，className，stuId，构造方法()，study()，sayHi()，playWith(String anotherName)
 */
public class Student {
    private String name;
    private int age;
    private String className;
    private String stuId;

    public Student() {
    }

    public Student(String name, int age, String className, String stuId) {
        this.name = name;
        this.age = age;
        this.className = className;
        this.stuId = stuId;
    }

    public void study() {
        System.out.println(name + "今年" + age + "岁了,学号是:" + stuId + ",所在班级是:" + className);
    }

    public void sayHi() {
        System.out.println(this.name + "说了声Hello");
    }

    public void playWith(String anotherName) {
        System.out.println(this.name + "和" + anotherName + "在一块玩耍");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getStuId() {
        return stuId;
    }

    public void setStuId(String stuId) {
        this.stuId = stuId;
    }
}
